import http from "@utils/request";


import { IDictRequest, IDictList, IDictForm, IDictFormAdd, IDictFormInfo } from "@interface/dict";

//字典列表
export const dictPage = (data: IDictForm): Promise<IDictList> => {
    return http.get<IDictList>('/system_dict_type/page', data)
}

//添加字典
export const dictAdd = (data: IDictFormInfo): Promise<IDictRequest> => {
    return http.post<IDictRequest>('/system_dict_type/', data)
}


//字典详情
export const dictGet = (data: string): Promise<IDictRequest> => {
    return http.get<IDictRequest>(`/system_dict_type/${data}`)
}



//修改字典
export const dictUpdate = (data: IDictFormInfo): Promise<IDictRequest> => {
    return http.put<IDictRequest>('/system_dict_type/', data)
}



//删除字典
export const dictDel = (data: string): Promise<IDictRequest> => {
    return http.delete<IDictRequest>(`/system_dict_type/${data}`)
}

